<template>
<div class="father">
    <h3>父组件</h3>
    <p>a:{{ a }}</p>
    <p>b:{{ b }}</p>
    <p>c:{{ c }}</p>
    <Child :a="a" :b="b" v-bind="{c,updateB}"/>
</div>
</template>

<script lang="ts" setup name="Father">
import { ref } from 'vue';
import Child from './Child.vue';

let a = ref(100)
let b = ref(10)
let c = ref(1)
function updateB(v:number)
{
    b.value+=v
}

</script>

<style scoped>
.father{
    background-color: rgb(164, 164, 164);
    padding: 20px;
    border-radius: 10px;
}
</style>